﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace DataAccess
{
    public class ErrorLog
    {
        public static void LogEvent(string source, string log, string text, int id, EventLogEntryType type)
        {
            if (!EventLog.SourceExists(source))
                EventLog.CreateEventSource(source, log);

            EventLog.WriteEntry(source, text, type, id); 

        }
    }
}
